#include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

double myPow(double x, int n);

int main()
{
	return 0;
}

double myPow(double x, int n)
{
	bool isNeg = n < 0 ? (n = -n) : false;

	double accumulate = x, res = 1;
	while (n > 0) {
		if (n & 1)
			res *= accumulate;
		accumulate *= accumulate;
		n >>= 1;
	}

	return isNeg ? 1.0 / res : res;
}
